
package com.xy.entity.msg;

import com.alibaba.fastjson.annotation.JSONField;
import com.xy.common.jpa.AbstractTimestampEntity;
import com.xy.entity.order.OrderMain;
import lombok.Data;

import javax.persistence.*;
import java.util.Date;

//消息-我的箱子
@Entity
@Data
public class ProductMsg extends AbstractTimestampEntity{


    private int status;
    private String msgId;
    private Date pushTime;
    private String title;
    private String msg;
    @Transient
    private int sum;//计算status的数量

    @JSONField(serialize = false)
    @ManyToOne(cascade = {CascadeType.REFRESH},fetch = FetchType.EAGER)
    @JoinColumn(name = "orderId")
    private OrderMain orderMain;
}

